import { BusinessGrade,CarTrip } from '../common/constants/GlobalTypes';
import Ability from '@ohos.app.ability.Ability';
export default class EntryAbility extends Ability {
  onCreate() {
    const carsList: CarTrip[] = [
      {
        id: 1,
        carId: 'D6815',
        twoPlaceApartTime: '55',
        startAfPlace: '西安北',
        startPlace: '西安北',
        middlePlace: '宝鸡南',
        endPlace: '宝鸡南',  // 修正错别字："男"→"南"
        startTime: '08:43',
        endTime: '09:38',
        businessGrade:[
          {seat:'二等',num:50,price:51.5},
          {seat:'一等',num:50,price:82.5}
          ,{seat:'商业',num:30,price:112.5}
          ,{seat:'无座',num:10,price:51.5}
        ],
        isReverse:true,
      },
      {
        id: 2,
        carId: 'Z305',
        twoPlaceApartTime: '1小时29分',
        startAfPlace: '',
        startPlace: '西安',
        middlePlace: '宝鸡',
        endPlace: '乌鲁木齐',  // 修正错别字："男"→"南"
        startTime: '08:52',
        endTime: '10:21',
        businessGrade:[
          {seat:'硬座',num:19,price:28.5}
          ,{seat:'卧铺',num:19,price:74.5}
          ,{seat:'软铺',num:19,price:112.5}
          ,{seat:'无座',num:19,price:28.5}
        ],
        isReverse:true,
      },
      {
        id: 3,
        carId: 'D2635',
        twoPlaceApartTime: '49分',
        // 过就是空字符串
        startAfPlace: '',
        startPlace: '西安北',
        middlePlace: '宝鸡南',
        endPlace: '武威东',  // 修正错别字："男"→"南"
        startTime: '08:54',
        endTime: '09:43',
        businessGrade:[
          {seat:'二等',num:50,price:51.5},
          {seat:'一等',num:50,price:82.5}
          ,{seat:'商业',num:0,price:112.5}
          ,{seat:'无座',num:10,price:51.5}
        ],
        isReverse:true,
      },
      {
        id: 4,
        carId: 'C183',
        twoPlaceApartTime: '1小时54分',
        startAfPlace: '西安',
        startPlace: '西安',
        middlePlace: '宝鸡',
        endPlace: '宝鸡',  // 修正错别字："男"→"南"
        startTime: '08:58',
        endTime: '10:52',
        businessGrade:[
          {seat:'二等',num:50,price:45},
          {seat:'一等',num:50,price:73}
          ,{seat:'商业',num:0,price:112.5}
          ,{seat:'无座',num:10,price:45}
        ],
        isReverse:true,
      },
      {
        id: 5,
        carId: 'Z231',
        twoPlaceApartTime: '1小时23分',
        startAfPlace: '',
        startPlace: '西安',
        middlePlace: '宝鸡',
        endPlace: '西宁',  // 修正错别字："男"→"南"
        startTime: '09:05',
        endTime: '10:37',
        businessGrade:[
          {seat:'硬座',num:19,price:28.5}
          ,{seat:'卧铺',num:19,price:74.5}
          ,{seat:'软铺',num:19,price:112.5}
          ,{seat:'无座',num:0,price:28.5}
        ],
        isReverse:true,
      },
      {
        id: 6,
        carId: 'D2719',
        twoPlaceApartTime: '55分',
        startAfPlace: '西安北',
        startPlace: '西安北',
        middlePlace: '宝鸡南',
        endPlace: '武威东',  // 修正错别字："男"→"南"
        startTime: '09:10',
        endTime: '10:05',
        businessGrade:[
          {seat:'二等',num:50,price:45},
          {seat:'一等',num:50,price:73}
          ,{seat:'商业',num:0,price:112.5}
          ,{seat:'无座',num:10,price:45}
        ],
        isReverse:true,
      },
      {
        id: 7,
        carId: 'Z165',
        twoPlaceApartTime: '1小时33分',
        startAfPlace: '',
        startPlace: '西安',
        middlePlace: '宝鸡',
        endPlace: '拉萨',  // 修正错别字："男"→"南"
        startTime: '09:27',
        endTime: '11:00',
        businessGrade:[
          {seat:'硬座',num:19,price:28.5}
          ,{seat:'卧铺',num:19,price:74.5}
          ,{seat:'软铺',num:19,price:112.5}
          ,{seat:'无座',num:0,price:28.5}
        ],
        isReverse:true,
      },
      {
        id: 8,
        carId: 'D2723',
        twoPlaceApartTime: '1小时1分',
        startAfPlace: '西安北',
        startPlace: '西安北',
        middlePlace: '宝鸡南',
        endPlace: '西宁',  // 修正错别字："男"→"南"
        startTime: '09:40',
        endTime: '10:41',
        businessGrade:[
          {seat:'二等',num:50,price:45},
          {seat:'一等',num:50,price:73}
          ,{seat:'商业',num:1,price:112.5}
          ,{seat:'无座',num:0,price:45}
        ],
        isReverse:true,
      },
      {
        id: 9,
        carId: 'K8205',
        twoPlaceApartTime: '45',
        startAfPlace: '西安',
        startPlace: '西安',
        middlePlace: '宝鸡',
        endPlace: '汉中',  // 修正错别字："男"→"南"
        startTime: '09:46',
        endTime: '11:52',
        businessGrade:[
          {seat:'硬座',num:19,price:28.5}
          ,{seat:'卧铺',num:0,price:74.5}
          ,{seat:'软铺',num:0,price:112.5}
          ,{seat:'无座',num:3,price:28.5}
        ],
        isReverse:true,
      },
      {
        id: 10,
        carId: 'D2737',
        twoPlaceApartTime: '55分',
        startAfPlace: '西安北',
        startPlace: '西安北',
        middlePlace: '宝鸡南',
        endPlace: '敦煌',  // 修正错别字："男"→"南"
        startTime: '10:21',
        endTime: '11:16',
        businessGrade:[
          {seat:'二等',num:50,price:45},
          {seat:'一等',num:0,price:73}
          ,{seat:'商业',num:0,price:112.5}
          ,{seat:'无座',num:10,price:45}
        ],
        isReverse:true,

      },
      {
        id: 11,
        carId: 'D6803',
        twoPlaceApartTime: '55分',
        // 开始
        startAfPlace: '西安北',
        startPlace: '西安北',
        middlePlace: '宝鸡南',
        endPlace: '宝鸡南',  // 修正错别字："男"→"南"
        startTime: '10:40',
        endTime: '11:35',
        businessGrade:[
          {seat:'二等',num:50,price:45},
          {seat:'一等',num:10,price:73}
          ,{seat:'商业',num:0,price:112.5}
          ,{seat:'无座',num:10,price:45}
        ],
        isReverse:true,
      }
    ];

    AppStorage.setOrCreate('carTrips', carsList);
  }
}